package com.yqg.education.mapper;

import com.yqg.education.entity.StuFeedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Mapper
public interface StuFeedbackMapper extends BaseMapper<StuFeedback> {

    @MapKey("id")
    List<StuFeedback> findCourseEvaluation(@Param("pageStartNumber") Integer pageStartNumber,
                                                 @Param("pageSize") Integer pageSize,
                                                 @Param("courseId") Integer courseId);

    Integer findCourseEvaluationCount(@Param("courseId") Integer courseId);

    List<StuFeedback> getFeedbackByClassId(@Param("classId") Long classId);

    List<StuFeedback> findPage(Integer pageStartNumber, Integer pageSize, String name, Integer courseId);

    Integer findCount(String name, Integer courseId);
}
